package com.itheima.homework.String类;

import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个java文件:" );
        String next = sc.next();
        if(next.endsWith(".java")){
            System.out.println("是java文件");
        }else{
            System.out.println("不是java文件");
        }
        int i = next.indexOf(".");
        System.out.println(i);
    }
}
